package test;

import entity.Students;
import mapper.StudentMapper;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class test02 {
    public static void main(String[] args) {
        ApplicationContext context = new ClassPathXmlApplicationContext("spring.xml");
        StudentMapper mapper = (StudentMapper) context.getBean("userDao");
        Students students = mapper.getStudentById(5);
        System.out.println(students.getName());
    }
}
